UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1LseZLEJRXiH17RDjPUrCStiO/q5N+rkiShV+hhPL50='
WHERE
key_id = 'c0f58a0d66033db18205fa63d25738c2f95837e368724c3fbc9ef8658ed57643'
AND (
token = '1LseZLEJRXiH17RDjPUrCStiO/q5N+rkiShV+hhPL50='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)