UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+VghIjzOXncPh9HCZCxlJTNIwrhx/K0N/Ug9z4UQMGE=' 
WHERE 
  key_id = '1028369e1da60c9ceaab4083023708026328426724d47973219270cd1f799c67' 
  AND (
    token = '+VghIjzOXncPh9HCZCxlJTNIwrhx/K0N/Ug9z4UQMGE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053