UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/+wWMBiGnnRDfnDnKmZtw1HNweAQbuGTL2+ymMC/XHg=' 
WHERE 
  key_id = '6e87b8dcc217f0fd15ffc3f89eeba47d7f3d53920cdde4a02ae575e7b592dcbc' 
  AND (
    token = '/+wWMBiGnnRDfnDnKmZtw1HNweAQbuGTL2+ymMC/XHg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021