UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4bS3P6XDo5IB8aDvmA6RHHSa7Fnj2MQhySKRnGvv5NQ='
WHERE
key_id = '2b84ab19cf9e293a39984fcf7dae7a348aa294cad7644b5fe3af850b799e9b7c'
AND (
token = '4bS3P6XDo5IB8aDvmA6RHHSa7Fnj2MQhySKRnGvv5NQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)