UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LNGlfNDC/fKD9F8Sl3wvcAL3wMOBe9l3QdY4bpwJ/r4=' 
WHERE 
  key_id = '60a6e2f84a76d1becc5cb4ac324e0270ed5af46577f6f6a990dba1f88563fd2c' 
  AND (
    token = 'LNGlfNDC/fKD9F8Sl3wvcAL3wMOBe9l3QdY4bpwJ/r4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023