UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5OO/VM5ytge70xTytieApTFjNAQ6Jqx/BaaaNBdCtig='
WHERE
key_id = '5fb52d365d6aa9dd5feef8b9bf2f5a259c6057d109cd61c4191fec3b2feb27b4'
AND (
token = '5OO/VM5ytge70xTytieApTFjNAQ6Jqx/BaaaNBdCtig='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)