UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CNQV+5VtsAylUnB0JD8huYDZCs6Lw6bVzWrA/b/mBx0=' 
WHERE 
  key_id = '0960ca95412c290a2d87c7b959d9b4e85d3bcd6e8fb8bd7d8efd53be684f96e9' 
  AND (
    token = 'CNQV+5VtsAylUnB0JD8huYDZCs6Lw6bVzWrA/b/mBx0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030