UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't/IQKiZ/K84SFNqD9cTqc7flhhvUsJIaG7/kiPYEHn4='
WHERE
key_id = '5f9e7d22253d82dab6d7976456b90a5af05d40ac641e7dfd74f9526db9665e95'
AND (
token = 't/IQKiZ/K84SFNqD9cTqc7flhhvUsJIaG7/kiPYEHn4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)