UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/y3HDl2RiN688ncgWU/Fh1zKXhr/ZyH3qzITuI3LlH8=' 
WHERE 
  key_id = '05a2dd09244e0f065e7a4307d14ae28f415bf2467d35bc3795fc897b856fb18b' 
  AND (
    token = '/y3HDl2RiN688ncgWU/Fh1zKXhr/ZyH3qzITuI3LlH8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024