UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FXUuoe/JQmBaLA7mWsBpneeUXWJ3OYwhYHULleK8XXc=' 
WHERE 
  key_id = 'fa343717f0d606dd3d439cd97026ac755b896e6f0d80ea75e7ec4e61fb2f2098' 
  AND (
    token = 'FXUuoe/JQmBaLA7mWsBpneeUXWJ3OYwhYHULleK8XXc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027