UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+jbl2KXt1beH2Uh8h2tBOCpUumSwfcLUBtNO1S7k10E=' 
WHERE 
  key_id = 'c33806ea70f5f4d598588ee217af54c2efd01eb42af6fdf5f25f8235596999d6' 
  AND (
    token = '+jbl2KXt1beH2Uh8h2tBOCpUumSwfcLUBtNO1S7k10E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047