UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'etn6LeRq/AJf+BZmj8MzW7uX4eSA1i7Gi4/TCui0FEE='
WHERE
key_id = 'd32063b4ff2348edaf7256833b70783bc67eca292a6574449053f41e243dfb7b'
AND (
token = 'etn6LeRq/AJf+BZmj8MzW7uX4eSA1i7Gi4/TCui0FEE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)