UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'etbBiDERO7Emyl4lD/HgAripLqeBteS8MTL2R414rPE='
WHERE
key_id = '17827d2d9e9e0178604ceef5853e69b37a5cc7f1deb57d22c6778dd7cc9d5c00'
AND (
token = 'etbBiDERO7Emyl4lD/HgAripLqeBteS8MTL2R414rPE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)