UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lul/o1vYAX9ntL1+kkXC6N0D8XFqrHHXDlSiltmriEI=' 
WHERE 
  key_id = '8ef4aea39e2ed018ea3ea239e93a8143aa22de6508bb5b928975663532580e27' 
  AND (
    token = 'lul/o1vYAX9ntL1+kkXC6N0D8XFqrHHXDlSiltmriEI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023