UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RLnca9nuaG8ySDHuXBbMFZSpZmRfg4iW/tN/TfS+T00=' 
WHERE 
  key_id = 'a53a8aa3a79b8cbfaddea8d3020c9bc5a5bfd4d63569f83973d0a2bffb938fa8' 
  AND (
    token = 'RLnca9nuaG8ySDHuXBbMFZSpZmRfg4iW/tN/TfS+T00=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043