UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RDzDG3Fio8LNrfSoizAyc+bCIOYd7a00CoKAqocRMKQ=' 
WHERE 
  key_id = '1d33f2bc7087136cc32eb61c1c0830f939cfe800ea65b126a046fb0b72669bd9' 
  AND (
    token = 'RDzDG3Fio8LNrfSoizAyc+bCIOYd7a00CoKAqocRMKQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046