UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Jxeufaj9V7MJMHd3+iXV15S/YPIoXwja/bofSElBQRc='
WHERE
key_id = '2b0309785e448554a60489aa8d902dd3ae68085d319a2a5c2ff5c148afaf1b7e'
AND (
token = 'Jxeufaj9V7MJMHd3+iXV15S/YPIoXwja/bofSElBQRc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)