UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rqCxlxciXLemlfS8TC/QEvSnGtSauHe0XOFR9KrF4Ic=' 
WHERE 
  key_id = '543cb637a1918a9e0ed92db54dcd1ea23e4db72c185700b2a98fe43de26e8d6d' 
  AND (
    token = 'rqCxlxciXLemlfS8TC/QEvSnGtSauHe0XOFR9KrF4Ic=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028