UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'XTPU8nF8YKnjCeoJ7+N9MBr+wWg08VDS2KScspWO+No=' 
WHERE 
  key_id = '2630409432055d2a5072c04ab39644bb7a6050724434636ccce77542ee8e2b8f' 
  AND (
    token = 'XTPU8nF8YKnjCeoJ7+N9MBr+wWg08VDS2KScspWO+No=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043