UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IRSgXQQvisNIzXtBrIZSelC1+D5nHo4Jr8DwmMSTv9M='
WHERE
key_id = '6cecac65e7ae81c025c09843532e913a27d8f2a9424e0865d78332b16cde62e3'
AND (
token = 'IRSgXQQvisNIzXtBrIZSelC1+D5nHo4Jr8DwmMSTv9M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)