UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 't4DKsmZvKUmGoIWtZuM4/RZIqGbl6fOX3JkaC6maWJE=' 
WHERE 
  key_id = '7e68439fc79bafa0dcd30a4e37c1690a1b6a711cef2569204f6de633f7318809' 
  AND (
    token = 't4DKsmZvKUmGoIWtZuM4/RZIqGbl6fOX3JkaC6maWJE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027