UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6tHr813qY9mo1/GR3RfHL1NImDeRxRq7UYYL1YCwhaE=' 
WHERE 
  key_id = '0435c2eb89eb2105b440a6fba02957cd0aada8fae93f8a606d60c5c9f3cf4bf9' 
  AND (
    token = '6tHr813qY9mo1/GR3RfHL1NImDeRxRq7UYYL1YCwhaE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033