UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5MQ8chOCaqdvDXV1DI36hbTK69EqBTTsbvrcCMfZTBo=' 
WHERE 
  key_id = '4703b5c976141531dca0e938c93587711626d907c5b649ed590d8dc4f7c7c5b0' 
  AND (
    token = '5MQ8chOCaqdvDXV1DI36hbTK69EqBTTsbvrcCMfZTBo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027