UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'neNVDFPYqIZqA83QNSn+VHv+eGYRcQOBysTvASkhbQQ='
WHERE
key_id = '5d2c06e32781da5f6ea1349bc434a2a47e1ad2d7f0df08bab968b4c17401927c'
AND (
token = 'neNVDFPYqIZqA83QNSn+VHv+eGYRcQOBysTvASkhbQQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)