UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e5UOGOrlvcZ+hR9IEZY1UAdvq+eUDLZinQ08+MY+RvE='
WHERE
key_id = 'b0c4850a78ca630d0a88d242ffdd83bde5c5d198aea887103360ac930043c42e'
AND (
token = 'e5UOGOrlvcZ+hR9IEZY1UAdvq+eUDLZinQ08+MY+RvE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)