UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4yFxdIziP/SW1fFTJibrNInhDs1mHL5Rl2tyUwt9ngk='
WHERE
key_id = 'a8d0a3d47899ce1a914fbf300513e35b359e4a3bcc2552bfb2d2bc88b6e4a291'
AND (
token = '4yFxdIziP/SW1fFTJibrNInhDs1mHL5Rl2tyUwt9ngk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)