UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7UqX5Tx8IoXZLeWscZ8GxTWjwEcYURqGMy7syW6FzVM=' 
WHERE 
  key_id = '8af8151ff2ef482fbe319c36d3d7d863c3557e7acec1cc7c63bb00863440a821' 
  AND (
    token = '7UqX5Tx8IoXZLeWscZ8GxTWjwEcYURqGMy7syW6FzVM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015