UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'YDhOYh4V6jFIH+lavcx5WjsO6zvQBp/xUGSjR41/3+4=' 
WHERE 
  key_id = '2a890914a09eb14ba722e6bc082d4b01d5795bda837833c49a13eb291f19c4ce' 
  AND (
    token = 'YDhOYh4V6jFIH+lavcx5WjsO6zvQBp/xUGSjR41/3+4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046