UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'va0c86agyuo2qytNyEd9YUNfLFD4a9VZ2H+1EhhENgA=' 
WHERE 
  key_id = '78c20d0c9e2700bc7f2840fa095ee2425ab470306e8ac1250eda583f7bc8027c' 
  AND (
    token = 'va0c86agyuo2qytNyEd9YUNfLFD4a9VZ2H+1EhhENgA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031