UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+W46I5H6oTyK4snppMPwhj98fTJa73VU5Zrc2te6ELA=' 
WHERE 
  key_id = '6b6611a70bc3d090631991061dfd214ee65597c7e6320fdda890e92ea3113485' 
  AND (
    token = '+W46I5H6oTyK4snppMPwhj98fTJa73VU5Zrc2te6ELA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00062