UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '549VrOJscG19mBemxYz/nX7T5YQGKGk0TMcRJe2fRWo='
WHERE
key_id = '8cf1c53e7cc3fa6401f16947be3bc934d6a6f56917e4a0dd8f0d67f7cdbb9e56'
AND (
token = '549VrOJscG19mBemxYz/nX7T5YQGKGk0TMcRJe2fRWo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)