UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uKilrIqXrtcmLnS2zn9HHQFQ5cn/IZ8JmjT4BmcqEMU='
WHERE
key_id = '1adc5cff6579e5562e07fbfb975b209ae453ad824c5a7778dd4e09ba19486086'
AND (
token = 'uKilrIqXrtcmLnS2zn9HHQFQ5cn/IZ8JmjT4BmcqEMU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)