UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LOjhmZbQJECeMbhgyu7zkdMfXYdf7FlNPy0kQGtOUhE='
WHERE
key_id = '4a1eca02d7bf7d1bcbc04edaa158c8e5676e82e0b1ec6942126d38e4757f60a8'
AND (
token = 'LOjhmZbQJECeMbhgyu7zkdMfXYdf7FlNPy0kQGtOUhE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)