UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gZTjzPGbyMQl5CVX3V2ZtBa/eUQfawosDoHd3ntDm8E='
WHERE
key_id = '210d92542b6071e607fb04aa15a3a890aef737fe1af48da0bd8220280f2dc06c'
AND (
token = 'gZTjzPGbyMQl5CVX3V2ZtBa/eUQfawosDoHd3ntDm8E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)