UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8BZ4Yveg0Pavfsp+YAyYWRFBzZzxgd70lReGvUiXTQ4='
WHERE
key_id = '55e39b5b1cdd4efa72b898c60fe29c96a8a322488c6d1157bfe190defd0c1ae6'
AND (
token = '8BZ4Yveg0Pavfsp+YAyYWRFBzZzxgd70lReGvUiXTQ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)