UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LEp8BnusYa1CmGvu2NRehuh20ZYCjQ2q0VUD2VHA8NM='
WHERE
key_id = '8ec1e4f2b25d7f2243cd9ec7e28d41fd5b40e60fcc9859e763e22d31750e1ae8'
AND (
token = 'LEp8BnusYa1CmGvu2NRehuh20ZYCjQ2q0VUD2VHA8NM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)