UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'znjD8EoxybwjJMb90UQ5BqS/3BR9XCkuff8NKC24slM=' 
WHERE 
  key_id = 'cccc5728084be671de2af9d63c0af2658e683b28d070454d19c09ea412461d2f' 
  AND (
    token = 'znjD8EoxybwjJMb90UQ5BqS/3BR9XCkuff8NKC24slM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015