UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NRVfq8/Q9rv9fXMuryU7Tg7p/PLlvdnXQCwuvf89q/E='
WHERE
key_id = '9d6e38e213b6d7820010b9a6f59ba8b02982ad540e41f0c1fc57bdc0ff27ea50'
AND (
token = 'NRVfq8/Q9rv9fXMuryU7Tg7p/PLlvdnXQCwuvf89q/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)