UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gj8qXkRZos7P/8nzR+4YYAk3X8MxW9NROvSZU6/MghQ='
WHERE
key_id = '0bc53ad6fca49ef5de6ba55db6c388e3d93d4ce6efb51261159b32ec81e9d724'
AND (
token = 'gj8qXkRZos7P/8nzR+4YYAk3X8MxW9NROvSZU6/MghQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)