UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VJW3UZhR1AeEcMgoJjFlhC12cWL4JjlqygUUlCiBMGk='
WHERE
key_id = '619c628d85f4ee8edae060e8a303af2363984a89c08d0afed213dc6e34e9f9fb'
AND (
token = 'VJW3UZhR1AeEcMgoJjFlhC12cWL4JjlqygUUlCiBMGk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)